
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Cubic response functions: \Sec{CCCR}}\label{sec:cccr}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\index{cubic response}
\index{response!cubic}
\index{Coupled Cluster!cubic response}
\index{fourth-order properties}
\index{properties!fourth-order}
\index{hyperpolarizabilities}
\index{second hyperpolarizability}
\index{hyperpolarizabilities!second}

In the \Sec{CCCR} section the input that is  specific for 
coupled cluster cubic response properties is read in.
This section includes:
\begin{itemize}
\item frequency-dependent fourth-order properties
      $$ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) = -
           \langle\langle A;B,C,D\rangle\rangle_{\omega_B,\omega_C,\omega_D}
         \quad \mbox{with~} \omega_A = -\omega_B -\omega_C -\omega_D
      $$
      where $A$, $B$, $C$ and $D$ can be any of the one-electron
      operators for which integrals are available in the 
      \Sec{*INTEGRALS} input part.
      \index{fourth-order properties}
\item dispersion coefficients $D_{ABCD}(l,m,n)$ for 
      $ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) $
      which for $n \ge 0$ are defined by the expansion 
      $$ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) = 
          \sum_{l,m,n=0}^{\infty} \omega_B^l \, \omega_C^m \, \omega_D^n
            D_{ABCD}(l,m,n) $$
      \index{dispersion coefficients}
\end{itemize}
Coupled cluster cubic response functions 
is implemented for the models CCS, CC2, CCSD, and CC3.
Dispersion coefficients for fourth-order properties
are implemented for the models CCS, CC2 and CCSD.
%Publications that report results obtained with CC cubic response
%calculations should cite Ref.\ \cite{Haettig:CCCR}.
%For dispersion coefficients also a citation of Ref.\
%\cite{Haettig:DISPGAMMA} should be included.

The response functions are evaluated for a number of operator quadruples
(specified with the keywords \Key{OPERAT}, \Key{DIPOLE}, or \Key{AVERAG})
which are combined with triples of frequency arguments specified
using the keywords \Key{MIXFRE}, \Key{THGFRE}, \Key{ESHGFR}, \Key{DFWMFR},
\Key{DCKERR}, or \Key{STATIC}. The different frequency keywords are 
compatible and might be arbitrarily combined or repeated.
For dispersion coefficients use the keyword \Key{DISPCF}.

\begin{center}
\fbox{
\parbox[h][\height][l]{12cm}{
\small
\noindent
{\bf Reference literature:}
\begin{list}{}{}
\item Cubic response: C.~H\"{a}ttig, O.~Christiansen, and P.~J{\o}rgensen \newblock {\em Chem.~Phys.~Lett.}, {\bf 282},\hspace{0.25em}139, (1998).
\item Dispersion coefficients: C.~H\"{a}ttig, and P.~J{\o}rgensen \newblock {\em Adv.~Quantum Chem.}, {\bf 35},\hspace{0.25em}111, (1999).
\item CC3 cubic response: F.~Pawlowski, P.~J{\o}rgensen, and C.~H\"{a}ttig \newblock {\em Chem.~Phys.~Lett.}, {\bf 391},\hspace{0.25em}27, (2004).
\end{list}
}}
\end{center}

\begin{description}
\item[\Key{AVERAG}] \verb| |\newline
\verb|READ (LUCMD,'(A)') AVERAGE|\newline
\verb|READ (LUCMD,'(A)') SYMMETRY|

Evaluate special tensor averages of cubic response functions.
Presently implemented are the isotropic averages of the second
dipole hyperpolarizability
$\gamma_{||}$ and $\gamma_{\bot}$.
Set \verb+AVERAGE+ to \verb+GAMMA_PAR+ 
to obtain $\gamma_{||}$ and to
\verb+GAMMA_ISO+ to obtain $\gamma_{||}$ and $\gamma_{\bot}$.
The \verb+SYMMETRY+ input defines the selection rules 
exploited to reduce the number of tensor elements that have to be
evaluated. Available options are
\verb+ATOM+, \verb+SPHTOP+ (spherical top), \verb+LINEAR+,
and \verb+GENER+ (use point group symmetry from geometry input).
Note that the \Key{AVERAG} option should be specified in the \Sec{CCCR}
section before any \Key{OPERAT} or \Key{DIPOLE} input.
 
\item[\Key{DCKERR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (DCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for dc-Kerr effect $\gamma_{ABCD}(-\omega;0,0,\omega)$:
on the first line following \Key{DCKERR} the number of different
frequencies are read, from the second line the input for
$\omega_D = \omega$ is read. $\omega_B$ and $\omega_C$ to $0$
and $\omega_A$ to $-\omega$. 
\index{Kerr effect, dc}\index{dc-Kerr effect}
 
\item[\Key{DFWMFR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for degenerate four wave mixing
$\gamma_{ABCD}(-\omega;\omega,\omega,-\omega)$:
on the first line following \Key{DFWMFR} the number of different
frequencies are read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ is set to $\omega$,
$\omega_D$ and $\omega_A$ to $-\omega$. 
\index{degenerate four wave mixing}\index{DFWM}
 
\item[\Key{DIPOLE}] 
Evaluate all symmetry allowed elements of the second dipole
hyperpolarizability (max. 81 components per frequency).

\item[\Key{DISPCF}] \verb| |\newline
\verb|READ (LUCMD,*) NCRDSPE| 

Calculate the dispersion coefficients $D_{ABCD}(l,m,n)$ up  to
$l+m+n = $ \verb+NCRDSPE+.
Note that dispersion coefficients presently are only available for
real fourth-order properties.
\index{dispersion coefficients}
 
% \item[\Key{ODDISP}]  % not yet implemented...
 
\item[\Key{ESHGFR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for electric field induced second harmonic generation\index{ESHG}
$\gamma_{ABCD}(-2\omega;\omega,\omega,0)$:
on the first line following \Key{ESHGFR} the number of different
frequencies are read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ is set to $\omega$,
$\omega_D$ to $0$ and $\omega_A$ to $-2\omega$. 
\index{second harmonic generation}\index{second harmonic generation!electric field induced}\index{ESHG}
 
\item[\Key{L2 BC}] solve response equations for the second-order
Lagrangian multipliers $\bar{t}^{BC}$ instead of the equations for 
the second-order amplitudes $t^{AD}$.
 
\item[\Key{L2 BCD}] solve response equations for the second-order
Lagrangian multipliers $\bar{t}^{BC}$, $\bar{t}^{BD}$, $\bar{t}^{CD}$
instead of the equations for the second-order amplitudes
$t^{AD}$, $t^{AC}$, $t^{AB}$.
 
\item[\Key{MIXFRE}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|\newline
\verb|READ (LUCMD,*) (CCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|\newline
\verb|READ (LUCMD,*) (DCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for general frequency mixing
$\gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D)$: on the first line
following \Key{MIXFRE} the number of different frequencies
is read and from the next three lines the frequency arguments 
$\omega_B$, $\omega_C$, and $\omega_D$ are read
($\omega_A$ is set to $-\omega_B-\omega_C-\omega_D$).
\index{general frequency mixing}
                                                           
\item[\Key{NO2NP1}] test option: switch off $2n+1$-rule for second-order
                    Cauchy vector equations.
 
\item[\Key{OPERAT}] \verb| |\newline
\verb|READ (LUCMD,'(4A8)') LABELA, LABELB, LABELC, LABELD|\newline
\verb|DO WHILE (LABELA(1:1).NE.'.' .AND. LABELA(1:1).NE.'*')|\newline
\verb|  READ (LUCMD,'(4A8)') LABELA, LABELB, LABELC, LABELD|\newline
\verb|END DO|

Read quadruples of operator labels, using exactly 8 characters for each. 
This means that if you should want e.g LABELA='XXROTSTR', LABELB='YYROTSTR', LABELC='XANGMOM ', and LABELD='XYROTSTR'
you must enter\newline
\verb|XXROTSTRYYROTSTRXANGMOM XYROTSTR|
For each of these operator quadruples the cubic response
function will be evaluated at all frequency triples.
Operator quadruples which do not correspond to symmetry allowed
combination will be ignored during the calculation. 

\item[\Key{PRINT}] \verb| |\newline
\verb|READ (LUCMD,*) IPRINT|

Set print parameter for the cubic response section.

\item[\Key{STATIC}] 
Add $\omega_A = \omega_B = \omega_C = \omega_D = 0$ to the frequency list.

\item[\Key{THGFRE}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for third harmonic generation
$\gamma_{ABCD}(-3\omega;\omega,\omega,\omega)$:
on the first line following \Key{THGFRE} the number of different
frequencies is read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ and $\omega_D$ are set to 
$\omega$ and $\omega_A$ to $-3\omega$. 
\index{third harmonic generation}\index{THG}
 
\item[\Key{USECHI}]
test option: use second-order $\chi$-vectors as intermediates
 
\item[\Key{USEXKS}] 
test option: use third-order $\xi$-vectors as intermediates
 
%\item[\Key{EXPCOF}]  % for expert use only !
%

\end{description}
